1. Field of the Invention
The present invention relates to semiconductor memories and in particular to non-volatile semiconductor memories having a security function.
2. Description of the Related Art
A conventional non-volatile semiconductor memory with a security function has an OTP (One Time Program or Protect) region where a pass-word, an ID number and the like are stored, and programmed data cannot be rewritten semi-permanently. Therefore an illegal rewrite, for example whereby the data programmed previously in OTP region are rewritten with information from other devices by an illegal user, is prevented.
However, on the access to this region, only the rewrite is impossible and the readout operation is possible for all users. Accordingly, since the data settled in the region can be read out by an illegal user, there is a serious problem in respect to the security.
Therefore, it seems to be most effective to forbid the readout of the data in the above OTP region by unauthorized users, thus preventing the above illegal copying. However, a method using a password is generally proposed as a way to forbid the readout of the data. In this method, it is decided in the device whether the password is correct or not when a user inputs a password before he accesses the desired data. Then the access is forbidden if it is decided that the password is not correct. On the other hand, the access is permitted if it is decided that the password is correct.
However, a problem in the above method using a password is that the password is broken easily. Namely if a password with 8 bits is used for example, there are only 256 possible combinations that can be used as the password. In such a case, an illegal user can break the password easily by trying to input all the combinations in turn.
Hence, if we try to use a more complicated password having more bits, it is required that a semiconductor memory has an extremely large circuit size. As seen above, when the conventional security method is applied to semiconductor memories, a trade-off between complexity of the password and the circuit size is necessary.